package com.hs.li.mapper;

import com.hs.li.pojo.CarManagement;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 汽车管理 Mapper 接口
 * </p>
 *
 * @author lhj
 * @since 2022-06-13
 */
public interface CarManagementMapper extends BaseMapper<CarManagement> {

    @Select("select car_number FROM t_car_management ORDER BY car_id desc limit 0,1")
    Integer selectLastCarNumber();

//    currentPage, pageSize, carPlate,carNumber

    List<CarManagement> selectByCondition(@Param("currentPage") Integer currentPage,
                                          @Param("pageSize") Integer pageSize,
                                          @Param("carPlate") String carPlate,
                                          @Param("carNumber") Integer carNumber,
                                          @Param("typeId") Integer typeId);
}
